using System.ComponentModel.DataAnnotations.Schema;

namespace Wips.Domain.Models.Authorities.Model
{
    /// <summary>
    /// 角色组与用户关联
    /// </summary>
    [Table("AuthorityRoleGroupUsers")]
    [SugarTable("AuthorityRoleGroupUsers")]
    public class RoleGroupUser : ValueObjectBase
    {
        /// <summary>
        /// 角色组ID
        /// </summary>
        /// <value></value>
        public string RoleGroupId { get; set; }

        /// <summary>
        /// 角色组
        /// </summary>
        /// <value></value>
        [Navigate(NavigateType.ManyToOne, nameof(RoleGroupId))]
        public RoleGroup RoleGroup { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        /// <value></value>
        public string UserId { get; set; }

        /// <summary>
        /// 用户
        /// </summary>
        /// <value></value>
        [Navigate(NavigateType.ManyToOne, nameof(UserId))]
        public User User { get; set; }
    }
}